import { Module } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'
import { SmsModule } from '@/modules/sms/sms.module'
import { User } from '@/modules/user/entities/user.entity'
import { JwtTool } from '@/shared/utils/tool'
import { UserWheelTask } from '../wheel-task/entities/user-wheel-task.entity'
import { WheelTask } from '../wheel-task/entities/wheel-task.entity'
import { PlayerUser } from './entities/player-user.entity'
import { PlayerUserController } from './player-user.controller'
import { PlayerUserService } from './player-user.service'
import { UserController } from './user.controller'
import { UserService } from './user.service'

@Module({
  providers: [JwtTool],
  exports: [JwtTool],
})
export class UtilsModule {}

@Module({
  imports: [TypeOrmModule.forFeature([User, PlayerUser, UserWheelTask, WheelTask]), UtilsModule, SmsModule],
  controllers: [UserController, PlayerUserController],
  providers: [UserService, PlayerUserService],
  exports: [UserService, PlayerUserService],
})
export class UserModule {}
